import httpInstance from '@/utils/http'

export const getComments = (targetId, targetType) => {
  return httpInstance({
    url: `/api/comment/getCommentsById/${targetId}/${targetType}`,
    method: 'get',
  })
}

export const postComment = (data) => {
  return httpInstance({
    url: '/api/comment/postComment',
    method: 'post',
    data,
  })
}

export const deleteComment = (commentId) => {
  return httpInstance({
    url: `/api/comment/deleteComment/${commentId}`,
    method: 'put',
  })
}
